import java.awt.Color;
import java.awt.Component;
import java.awt.Container;
import java.awt.Font;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Properties;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JFormattedTextField;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JRadioButton;
import javax.swing.JSlider;
import javax.swing.JTabbedPane;
import javax.swing.JTextPane;
import javax.swing.border.LineBorder;
import org.rsbot.script.methods.GrandExchange;
import org.rsbot.script.methods.GrandExchange.GEItem;
import org.rsbot.util.GlobalConfiguration.Paths;

public class FallenSuperheater$GUI extends JFrame
  implements WindowListener
{
  private static final long serialVersionUID = -34342L;
  private JPanel contentPane;
  private JPanel Panel1;
  private JPanel Panel2;
  private JPanel Panel3;
  private JTabbedPane TabbedPanel;
  private JButton startButton;
  private JButton exitButton;
  private JButton save;
  private JButton load;
  private JButton profitCheck;
  private JRadioButton Box1;
  private JRadioButton Box2;
  private JRadioButton Box3;
  private JRadioButton Box5;
  private JComboBox Options;
  private JLabel OptionText;
  private JLabel BoxText;
  private JLabel Slider1Text;
  private JLabel Slider2Text;
  private JLabel FieldText1;
  private JLabel FieldText2;
  private JLabel FieldText3;
  private JFormattedTextField TextField;
  private JFormattedTextField TextField2;
  private JFormattedTextField TextField3;
  private JTextPane TextPanel;
  private JSlider Slider1;
  private JSlider Slider2;
  FallenSuperheater script;

  public FallenSuperheater$GUI(FallenSuperheater paramFallenSuperheater1, FallenSuperheater paramFallenSuperheater2)
  {
    this.script = paramFallenSuperheater2;
    initComponents();
  }

  private void initComponents()
  {
    addWindowListener(this);
    this.contentPane = ((JPanel)getContentPane());
    this.contentPane.setLayout(null);
    this.contentPane.setOpaque(false);

    this.TabbedPanel = new JTabbedPane();
    this.Panel1 = new JPanel();
    this.Panel2 = new JPanel();
    this.Panel3 = new JPanel();
    this.TabbedPanel.setFont(new Font("Verdana", 0, 12));
    this.TabbedPanel.setBorder(null);
    this.TabbedPanel.setFocusable(false);
    this.TabbedPanel.addTab("General", this.Panel1);
    this.TabbedPanel.addTab("Anti-Ban", this.Panel2);
    this.TabbedPanel.addTab("Info", this.Panel3);
    this.Panel1.setFont(new Font("Verdana", 0, 12));
    this.Panel1.setFocusable(false);
    this.Panel1.setLayout(null);
    this.Panel2.setFont(new Font("Verdana", 0, 12));
    this.Panel2.setFocusable(false);
    this.Panel2.setLayout(null);
    this.Panel3.setFont(new Font("Verdana", 0, 12));
    this.Panel3.setFocusable(false);
    this.Panel3.setLayout(null);

    this.startButton = new JButton();
    this.startButton.setFont(new Font("Verdana", 0, 12));
    this.startButton.setText("Start");
    this.startButton.setEnabled(true);
    this.startButton.addActionListener(new FallenSuperheater.GUI.1(this));

    this.exitButton = new JButton();
    this.exitButton.setText("Cancel");
    this.exitButton.addActionListener(new FallenSuperheater.GUI.2(this));

    this.load = new JButton();
    this.load.setText("Load");
    this.load.addActionListener(new FallenSuperheater.GUI.3(this));

    this.save = new JButton();
    this.save.setText("Save");
    this.save.addActionListener(new FallenSuperheater.GUI.4(this));

    String[] arrayOfString = { "Bronze", "Iron", "Steel", "Silver", "Gold", "Mithril", "Adamantite", "Runite" };

    this.Options = new JComboBox(arrayOfString);
    this.OptionText = new JLabel();
    this.Options.setSelectedItem(arrayOfString[2]);
    this.OptionText.setFont(new Font("Verdana", 0, 14));
    this.OptionText.setText("Which bars to make?");
    this.Options.setBorder(null);
    this.Options.setOpaque(false);
    this.Options.setFocusable(false);
    this.Options.addActionListener(new FallenSuperheater.GUI.5(this));

    this.Box5 = new JRadioButton();
    this.Box5.setText("Use coal bag?");
    String str = this.Options.getSelectedItem().toString();
    if ((str != null) && ((str == "Steel") || (str == "Mithril") || (str == "Adamantite") || (str == "Runite")))
    {
      this.Box5.setEnabled(true);
    }
    else this.Box5.setEnabled(false);

    this.profitCheck = new JButton();
    this.profitCheck.setText("Check profit");
    this.profitCheck.addMouseListener(new FallenSuperheater.GUI.6(this));

    this.TextField = new JFormattedTextField();
    this.TextField.setValue("5000");
    this.TextField.setEnabled(false);
    this.BoxText = new JLabel();
    this.BoxText.setText("Casts");
    this.BoxText.setEnabled(false);
    this.Box1 = new JRadioButton();
    this.Box1.setText("Log out after...");
    this.Box1.addActionListener(new FallenSuperheater.GUI.7(this));

    this.Box2 = new JRadioButton();
    this.Box2.setText("Calculate prices?");
    this.Box2.setEnabled(true);
    this.Box2.setSelected(true);

    this.Box3 = new JRadioButton();
    this.Box3.setText("Take a screenshot when finished?");
    this.Box3.setEnabled(true);

    this.Slider1Text = new JLabel();
    this.Slider1Text.setFont(new Font("Verdana", 0, 12));
    this.Slider1Text.setText("Mouse Speed (%)");
    this.Slider1Text.setEnabled(true);

    this.Slider1 = new JSlider();
    this.Slider1.setMaximum(100);
    this.Slider1.setMinimum(10);
    this.Slider1.setBorder(null);
    this.Slider1.setOpaque(false);
    this.Slider1.setPaintTicks(true);
    this.Slider1.setPaintLabels(true);
    this.Slider1.setSnapToTicks(true);
    this.Slider1.setMajorTickSpacing(10);
    this.Slider1.setValue(60);
    this.Slider1.setFocusable(false);

    this.Slider2Text = new JLabel();
    this.Slider2Text.setFont(new Font("Verdana", 0, 12));
    this.Slider2Text.setText("Anti-Ban efficiency (%)");
    this.Slider2Text.setEnabled(true);

    this.Slider2 = new JSlider();
    this.Slider2.setMaximum(100);
    this.Slider2.setMinimum(10);
    this.Slider2.setBorder(null);
    this.Slider2.setOpaque(false);
    this.Slider2.setPaintTicks(true);
    this.Slider2.setPaintLabels(true);
    this.Slider2.setSnapToTicks(true);
    this.Slider2.setMajorTickSpacing(10);
    this.Slider2.setValue(50);
    this.Slider2.setFocusable(false);

    this.FieldText1 = new JLabel();
    this.FieldText1.setFont(new Font("Verdana", 0, 12));
    this.FieldText1.setText("AFK times (seconds): ");
    this.FieldText1.setEnabled(true);
    this.FieldText2 = new JLabel();
    this.FieldText2.setText("Min:");
    this.FieldText2.setEnabled(true);
    this.FieldText3 = new JLabel();
    this.FieldText3.setText("Max:");
    this.FieldText3.setEnabled(true);

    this.TextField2 = new JFormattedTextField();
    this.TextField2.setValue("2");
    this.TextField2.setEnabled(true);
    this.TextField3 = new JFormattedTextField();
    this.TextField3.setValue("10");
    this.TextField3.setEnabled(true);

    this.TextPanel = new JTextPane();
    this.TextPanel.setText("Fallen's Superheater AIO - v5.99\n\n Start the script at any bank. Have natures in your inventory and a staff with unlimited fire runes equipped.\n Place the ores in your bank so that they can be seen.");

    this.TextPanel.setEditable(false);
    this.TextPanel.setFont(new Font("Verdana", 0, 12));
    this.TextPanel.setBorder(new LineBorder(Color.black));

    setSize(400, 400);
    setTitle("Fallen's Superheater v5.99");
    addComponent(this.contentPane, this.startButton, 5, 270, 375, 55);
    addComponent(this.contentPane, this.exitButton, 140, 330, 100, 25);
    addComponent(this.contentPane, this.TabbedPanel, 5, 5, 375, 260);
    addComponent(this.contentPane, this.save, 5, 333, 60, 20);
    addComponent(this.contentPane, this.load, 315, 333, 60, 20);

    addComponent(this.Panel1, this.OptionText, 113, 10, 250, 25);
    addComponent(this.Panel1, this.Options, 130, 42, 90, 26);
    addComponent(this.Panel1, this.Box5, 25, 45, 95, 20);
    addComponent(this.Panel1, this.profitCheck, 230, 45, 90, 20);

    addComponent(this.Panel1, this.Box1, 5, 105, 108, 20);
    addComponent(this.Panel1, this.TextField, 115, 104, 100, 20);
    addComponent(this.Panel1, this.BoxText, 225, 105, 150, 20);

    addComponent(this.Panel1, this.Box2, 5, 130, 200, 20);
    addComponent(this.Panel1, this.Box3, 5, 155, 220, 20);

    addComponent(this.Panel2, this.Slider2Text, 115, 10, 200, 20);
    addComponent(this.Panel2, this.Slider2, 85, 25, 200, 50);
    addComponent(this.Panel2, this.Slider1Text, 128, 155, 200, 20);
    addComponent(this.Panel2, this.Slider1, 85, 170, 200, 50);

    addComponent(this.Panel2, this.FieldText1, 20, 85, 150, 50);
    addComponent(this.Panel2, this.FieldText2, 170, 100, 23, 20);
    addComponent(this.Panel2, this.TextField2, 196, 100, 30, 20);
    addComponent(this.Panel2, this.FieldText3, 240, 100, 27, 20);
    addComponent(this.Panel2, this.TextField3, 268, 100, 30, 20);

    addComponent(this.Panel3, this.TextPanel, 10, 10, 350, 210);
  }

  private void addComponent(Container paramContainer, Component paramComponent, int paramInt1, int paramInt2, int paramInt3, int paramInt4)
  {
    paramComponent.setBounds(paramInt1, paramInt2, paramInt3, paramInt4);
    paramContainer.add(paramComponent);
  }

  private void startButtonActionPerformed()
  {
    FallenSuperheater.access$2602(this.Slider1.getValue());
    FallenSuperheater.access$2702(this.Slider2.getValue());
    FallenSuperheater.access$2802(this.this$0, this.Options.getSelectedItem().toString());
    FallenSuperheater.access$2902(this.this$0, this.TextField.getValue());
    FallenSuperheater.access$3002(this.this$0, this.TextField2.getValue());
    FallenSuperheater.access$3102(this.this$0, this.TextField3.getValue());
    FallenSuperheater.access$3202(Integer.parseInt((String)FallenSuperheater.access$3000(this.this$0)));
    FallenSuperheater.access$3302(Integer.parseInt((String)FallenSuperheater.access$3100(this.this$0)));
    if (FallenSuperheater.access$2800(this.this$0).equals("Bronze")) {
      FallenSuperheater.access$3402(this.this$0, 2349);
      FallenSuperheater.access$3502(this.this$0, 436);
      FallenSuperheater.access$3602(this.this$0, 438);
      FallenSuperheater.access$3702(this.this$0, 13);
      FallenSuperheater.access$3802(this.this$0, 13);
      FallenSuperheater.access$3902(this.this$0, true);
      FallenSuperheater.access$4002(this.this$0, "Bronze");
      FallenSuperheater.access$4102(this.this$0, 6.25D);
      FallenSuperheater.access$4202(this.this$0, 1);
      FallenSuperheater.access$4302(this.this$0, 13);
      FallenSuperheater.access$4402(this.this$0, 13);
    } else if (FallenSuperheater.access$2800(this.this$0).equals("Iron")) {
      FallenSuperheater.access$3402(this.this$0, 2351);
      FallenSuperheater.access$3502(this.this$0, 440);

      FallenSuperheater.access$3702(this.this$0, 0);

      FallenSuperheater.access$3902(this.this$0, false);
      FallenSuperheater.access$4002(this.this$0, "Iron");
      FallenSuperheater.access$4102(this.this$0, 12.5D);
      FallenSuperheater.access$4202(this.this$0, 0);
      FallenSuperheater.access$4302(this.this$0, 27);
      FallenSuperheater.access$4402(this.this$0, 0);
    } else if (FallenSuperheater.access$2800(this.this$0).equals("Steel")) {
      FallenSuperheater.access$3402(this.this$0, 2353);
      FallenSuperheater.access$3502(this.this$0, 440);
      FallenSuperheater.access$3602(this.this$0, 453);
      if (this.Box5.isSelected()) {
        FallenSuperheater.access$3702(this.this$0, 17);
        FallenSuperheater.access$4302(this.this$0, 17);
        FallenSuperheater.access$4402(this.this$0, 9);
      } else {
        FallenSuperheater.access$3702(this.this$0, 9);
        FallenSuperheater.access$4302(this.this$0, 9);
        FallenSuperheater.access$4402(this.this$0, 18);
      }
      FallenSuperheater.access$3802(this.this$0, 0);
      FallenSuperheater.access$3902(this.this$0, true);
      FallenSuperheater.access$4002(this.this$0, "Steel");
      FallenSuperheater.access$4102(this.this$0, 17.5D);
      FallenSuperheater.access$4202(this.this$0, 2);
    } else if (FallenSuperheater.access$2800(this.this$0).equals("Silver")) {
      FallenSuperheater.access$3402(this.this$0, 2355);
      FallenSuperheater.access$3502(this.this$0, 442);

      FallenSuperheater.access$3702(this.this$0, 0);

      FallenSuperheater.access$3902(this.this$0, false);
      FallenSuperheater.access$4002(this.this$0, "Silver");
      FallenSuperheater.access$4102(this.this$0, 13.699999999999999D);
      FallenSuperheater.access$4202(this.this$0, 0);
      FallenSuperheater.access$4302(this.this$0, 27);
      FallenSuperheater.access$4402(this.this$0, 0);
    } else if (FallenSuperheater.access$2800(this.this$0).equals("Gold")) {
      FallenSuperheater.access$3402(this.this$0, 2357);
      FallenSuperheater.access$3502(this.this$0, 444);

      FallenSuperheater.access$3702(this.this$0, 0);

      FallenSuperheater.access$3902(this.this$0, false);
      FallenSuperheater.access$4002(this.this$0, "Gold");
      FallenSuperheater.access$4102(this.this$0, 56.200000000000003D);
      FallenSuperheater.access$4202(this.this$0, 0);
      FallenSuperheater.access$4302(this.this$0, 27);
      FallenSuperheater.access$4402(this.this$0, 0);
    } else if (FallenSuperheater.access$2800(this.this$0).equals("Mithril")) {
      FallenSuperheater.access$3402(this.this$0, 2359);
      FallenSuperheater.access$3502(this.this$0, 447);
      FallenSuperheater.access$3602(this.this$0, 453);
      if (this.Box5.isSelected()) {
        FallenSuperheater.access$3702(this.this$0, 10);
        FallenSuperheater.access$4302(this.this$0, 10);
        FallenSuperheater.access$4402(this.this$0, 16);
      } else {
        FallenSuperheater.access$3702(this.this$0, 5);
        FallenSuperheater.access$4302(this.this$0, 5);
        FallenSuperheater.access$4402(this.this$0, 22);
      }
      FallenSuperheater.access$3802(this.this$0, 0);
      FallenSuperheater.access$3902(this.this$0, true);
      FallenSuperheater.access$4002(this.this$0, "Mithril");
      FallenSuperheater.access$4102(this.this$0, 30.0D);
      FallenSuperheater.access$4202(this.this$0, 4);
    }
    else if (FallenSuperheater.access$2800(this.this$0).equals("Adamantite")) {
      FallenSuperheater.access$3402(this.this$0, 2361);
      FallenSuperheater.access$3502(this.this$0, 449);
      FallenSuperheater.access$3602(this.this$0, 453);
      if (this.Box5.isSelected()) {
        FallenSuperheater.access$3702(this.this$0, 7);
        FallenSuperheater.access$4302(this.this$0, 7);
        FallenSuperheater.access$4402(this.this$0, 19);
      } else {
        FallenSuperheater.access$3702(this.this$0, 9);
        FallenSuperheater.access$4302(this.this$0, 9);
        FallenSuperheater.access$4402(this.this$0, 18);
      }
      FallenSuperheater.access$3802(this.this$0, 0);
      FallenSuperheater.access$3902(this.this$0, true);
      FallenSuperheater.access$4002(this.this$0, "Adamant");
      FallenSuperheater.access$4102(this.this$0, 37.5D);
      FallenSuperheater.access$4202(this.this$0, 6);
    } else if (FallenSuperheater.access$2800(this.this$0).equals("Runite")) {
      FallenSuperheater.access$3402(this.this$0, 2363);
      FallenSuperheater.access$3502(this.this$0, 451);
      FallenSuperheater.access$3602(this.this$0, 453);
      if (this.Box5.isSelected()) {
        FallenSuperheater.access$3702(this.this$0, 5);
        FallenSuperheater.access$4302(this.this$0, 5);
        FallenSuperheater.access$4402(this.this$0, 21);
      } else {
        FallenSuperheater.access$3702(this.this$0, 3);
        FallenSuperheater.access$4302(this.this$0, 3);
        FallenSuperheater.access$4402(this.this$0, 24);
      }
      FallenSuperheater.access$3802(this.this$0, 0);
      FallenSuperheater.access$3902(this.this$0, true);
      FallenSuperheater.access$4002(this.this$0, "Runite");
      FallenSuperheater.access$4102(this.this$0, 50.0D);
      FallenSuperheater.access$4202(this.this$0, 8);
    }

    if (FallenSuperheater.access$2600() == 100)
      FallenSuperheater.access$4502(this.this$0, 3);
    else if (FallenSuperheater.access$2600() == 90)
      FallenSuperheater.access$4502(this.this$0, 4);
    else if (FallenSuperheater.access$2600() == 80)
      FallenSuperheater.access$4502(this.this$0, 5);
    else if (FallenSuperheater.access$2600() == 70)
      FallenSuperheater.access$4502(this.this$0, 6);
    else if (FallenSuperheater.access$2600() == 60)
      FallenSuperheater.access$4502(this.this$0, 7);
    else if (FallenSuperheater.access$2600() == 50)
      FallenSuperheater.access$4502(this.this$0, 8);
    else if (FallenSuperheater.access$2600() == 40)
      FallenSuperheater.access$4502(this.this$0, 9);
    else if (FallenSuperheater.access$2600() == 30)
      FallenSuperheater.access$4502(this.this$0, 10);
    else if (FallenSuperheater.access$2600() == 20)
      FallenSuperheater.access$4502(this.this$0, 11);
    else if (FallenSuperheater.access$2600() == 10) {
      FallenSuperheater.access$4502(this.this$0, 12);
    }
    if (this.Box2.isSelected()) {
      FallenSuperheater.access$4602(this.this$0, true);
    }
    if (this.Box1.isSelected()) {
      FallenSuperheater.access$4702(Integer.parseInt((String)FallenSuperheater.access$2900(this.this$0)));
    }

    if (this.Box3.isSelected()) {
      FallenSuperheater.access$4802(this.this$0, true);
    }
    if ((this.Box5.isEnabled()) && 
      (this.Box5.isSelected())) {
      FallenSuperheater.access$4902(this.this$0, true);
    }

    this.script.WaitForStart = false;
    FallenSuperheater.access$5002(this.this$0, true);
    dispose();
  }

  private void exitButtonActionPerformed()
  {
    this.this$0.WaitForStart = false;
    FallenSuperheater.access$5002(this.this$0, false);
    dispose();
  }

  private void Box1ButtonActionPerformed() {
    if (!this.BoxText.isEnabled()) {
      this.BoxText.setEnabled(true);
      this.TextField.setEnabled(true);
    } else {
      this.BoxText.setEnabled(false);
      this.TextField.setEnabled(false);
    }
  }

  private void calcProfit() {
    int i = 0;

    String str2 = this.Options.getSelectedItem().toString();
    if (str2.equals("Bronze")) {
      FallenSuperheater.access$3402(this.this$0, 2349);
      FallenSuperheater.access$3502(this.this$0, 436);
      FallenSuperheater.access$3602(this.this$0, 438);
      FallenSuperheater.access$4002(this.this$0, "Bronze");
      FallenSuperheater.access$4202(this.this$0, 1);
    }
    if (str2.equals("Iron")) {
      FallenSuperheater.access$3402(this.this$0, 2351);
      FallenSuperheater.access$3502(this.this$0, 440);
      FallenSuperheater.access$3602(this.this$0, 0);
      FallenSuperheater.access$4002(this.this$0, "Iron");
      FallenSuperheater.access$4202(this.this$0, 0);
    }
    if (str2.equals("Steel")) {
      FallenSuperheater.access$3402(this.this$0, 2353);
      FallenSuperheater.access$3502(this.this$0, 440);
      FallenSuperheater.access$3602(this.this$0, 453);
      FallenSuperheater.access$4002(this.this$0, "Steel");
      FallenSuperheater.access$4202(this.this$0, 2);
    }
    if (str2.equals("Silver")) {
      FallenSuperheater.access$3402(this.this$0, 2355);
      FallenSuperheater.access$3502(this.this$0, 442);
      FallenSuperheater.access$3602(this.this$0, 0);
      FallenSuperheater.access$4002(this.this$0, "Silver");
      FallenSuperheater.access$4202(this.this$0, 0);
    }
    if (str2.equals("Gold")) {
      FallenSuperheater.access$3402(this.this$0, 2357);
      FallenSuperheater.access$3502(this.this$0, 444);
      FallenSuperheater.access$3602(this.this$0, 0);
      FallenSuperheater.access$4002(this.this$0, "Gold");
      FallenSuperheater.access$4202(this.this$0, 0);
    }
    if (str2.equals("Mithril")) {
      FallenSuperheater.access$3402(this.this$0, 2359);
      FallenSuperheater.access$3502(this.this$0, 447);
      FallenSuperheater.access$3602(this.this$0, 453);
      FallenSuperheater.access$4002(this.this$0, "Mithril");
      FallenSuperheater.access$4202(this.this$0, 4);
    }
    if (str2.equals("Adamantite")) {
      FallenSuperheater.access$3402(this.this$0, 2361);
      FallenSuperheater.access$3502(this.this$0, 449);
      FallenSuperheater.access$3602(this.this$0, 453);
      FallenSuperheater.access$4002(this.this$0, "Adamant");
      FallenSuperheater.access$4202(this.this$0, 6);
    }
    if (str2.equals("Runite")) {
      FallenSuperheater.access$3402(this.this$0, 2363);
      FallenSuperheater.access$3502(this.this$0, 451);
      FallenSuperheater.access$3602(this.this$0, 453);
      FallenSuperheater.access$4002(this.this$0, "Runite");
      FallenSuperheater.access$4202(this.this$0, 8);
    }
    int j = FallenSuperheater.access$5100(this.this$0).lookup(FallenSuperheater.access$3500(this.this$0)).getGuidePrice();
    int k = FallenSuperheater.access$5200(this.this$0).lookup(FallenSuperheater.access$3600(this.this$0)).getGuidePrice() * FallenSuperheater.access$4200(this.this$0);

    int m = FallenSuperheater.access$5300(this.this$0).lookup(561).getGuidePrice();
    int n = FallenSuperheater.access$5400(this.this$0).lookup(FallenSuperheater.access$3400(this.this$0)).getGuidePrice();
    i = n - m - j - k;
    String str1 = FallenSuperheater.access$5500(this.this$0).getItemName(FallenSuperheater.access$3400(this.this$0));
    JOptionPane.showMessageDialog(null, "Profit for each \"" + str1 + "\" is currently " + i + " GP.", "Profit checker", 1, null);
  }

  public void windowClosing(WindowEvent paramWindowEvent)
  {
    this.this$0.WaitForStart = false;
    FallenSuperheater.access$5002(this.this$0, false);
    dispose();
  }

  public void windowActivated(WindowEvent paramWindowEvent)
  {
    toFront();
  }

  public void windowClosed(WindowEvent paramWindowEvent)
  {
  }

  public void windowDeactivated(WindowEvent paramWindowEvent)
  {
  }

  public void windowDeiconified(WindowEvent paramWindowEvent)
  {
  }

  public void windowIconified(WindowEvent paramWindowEvent)
  {
  }

  public void windowOpened(WindowEvent paramWindowEvent)
  {
  }

  private boolean saveOptions(Properties paramProperties)
  {
    String str1 = this.Options.getSelectedItem().toString();
    paramProperties.setProperty("Type", str1);

    if (this.Box5.isSelected())
      paramProperties.setProperty("CoalBag", "1");
    else {
      paramProperties.setProperty("CoalBag", "2");
    }

    if (this.Box1.isSelected()) {
      paramProperties.setProperty("LogOut", "1");
      try
      {
        str2 = this.TextField.getValue().toString();
      } catch (Exception localException1) {
        str2 = "5000";
      }
      paramProperties.setProperty("Casts", str2);
    } else {
      paramProperties.setProperty("LogOut", "2");
      paramProperties.setProperty("Casts", "5000");
    }

    if (this.Box2.isSelected())
      paramProperties.setProperty("Calculate", "1");
    else {
      paramProperties.setProperty("Calculate", "2");
    }

    if (this.Box3.isSelected())
      paramProperties.setProperty("ScreenShot", "1");
    else {
      paramProperties.setProperty("ScreenShot", "2");
    }

    String str2 = String.valueOf(this.Slider2.getValue());
    paramProperties.setProperty("AntiBan", str2);

    String str3 = "2";
    String str4 = "10";
    try {
      str3 = (String)this.TextField2.getValue();
      str4 = (String)this.TextField3.getValue();
    } catch (Exception localException2) {
      str3 = "2";
      str4 = "10";
    }
    paramProperties.setProperty("Min", str3);
    paramProperties.setProperty("Max", str4);

    String str5 = String.valueOf(this.Slider1.getValue());
    paramProperties.setProperty("Mouse", str5);
    try
    {
      paramProperties.store(new FileWriter(new File(GlobalConfiguration.Paths.getSettingsDirectory(), "FallenSuperheater.ini")), "Options for FallenSuperheater.");

      return true; } catch (IOException localIOException) {
    }
    return false;
  }

  private boolean loadOptions(Properties paramProperties)
  {
    try {
      paramProperties.load(new FileInputStream(new File(GlobalConfiguration.Paths.getSettingsDirectory(), "FallenSuperheater.ini")));
    }
    catch (FileNotFoundException localFileNotFoundException)
    {
      return false;
    } catch (IOException localIOException) {
      return false;
    }

    if (paramProperties.getProperty("Type") != null) {
      this.Options.setSelectedItem(paramProperties.getProperty("Type"));
    }
    if (paramProperties.getProperty("CoalBag") != null) {
      if (paramProperties.getProperty("CoalBag").equals("1")) {
        this.Box5.setEnabled(true);
        this.Box5.setSelected(true);
      } else {
        this.Box5.setSelected(false);
      }
    }
    if (paramProperties.getProperty("LogOut") != null) {
      if (paramProperties.getProperty("LogOut").equals("1")) {
        this.Box1.setSelected(true);
        this.TextField.setEnabled(true);
        this.BoxText.setEnabled(true);
        if (paramProperties.getProperty("Casts") != null)
          this.TextField.setValue(paramProperties.getProperty("Casts"));
      }
      else {
        this.Box1.setSelected(false);
        this.TextField.setEnabled(false);
        this.BoxText.setEnabled(false);
      }
    }
    if (paramProperties.getProperty("Calculate") != null) {
      if (paramProperties.getProperty("Calculate").equals("1"))
        this.Box2.setSelected(true);
      else {
        this.Box2.setSelected(false);
      }
    }
    if (paramProperties.getProperty("ScreenShot") != null) {
      if (paramProperties.getProperty("ScreenShot").equals("1"))
        this.Box3.setSelected(true);
      else {
        this.Box3.setSelected(false);
      }
    }
    if (paramProperties.getProperty("AntiBan") != null) {
      this.Slider2.setValue(Integer.parseInt(paramProperties.getProperty("AntiBan")));
    }
    if (paramProperties.getProperty("Min") != null) {
      this.TextField2.setValue(paramProperties.getProperty("Min"));
    }
    if (paramProperties.getProperty("Max") != null) {
      this.TextField3.setValue(paramProperties.getProperty("Max"));
    }
    if (paramProperties.getProperty("Mouse") != null) {
      this.Slider1.setValue(Integer.parseInt(paramProperties.getProperty("Mouse")));
    }
    return true;
  }
}